From 13017239055dc492f7e5cdeae63f01e6e820da4e Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Mon, 28 Aug 2017 18:38:45 +0100 Subject: [PATCH] Revert "combobox: remove superfluous GTK+ grabs" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit 46b4e5d38877197503f802380e5c9a469218f99b. Apparently these weren’t so redundant, because their removal introduced at least 2 bugs in list-mode ComboBoxes: failure to close the popup upon clicking out of it, and failing to receive mouse input in the popup of a CB in a modal window. It may also have caused (even more!) stuck grabs. https://bugzilla.gnome.org/show_bug.cgi?id=738387 https://bugzilla.gnome.org/show_bug.cgi?id=776793 --- gtk/gtkcombobox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index fa1e26c238..ede2fba625 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2374,6 +2374,7 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box, return; } + gtk_device_grab_add (priv->popup_window, pointer, TRUE); priv->grab_pointer = pointer; g_signal_connect (priv->popup_window, @@ -2448,6 +2449,7 @@ gtk_combo_box_popdown (GtkComboBox *combo_box) if (priv->grab_pointer) gdk_seat_ungrab (gdk_device_get_seat (priv->grab_pointer)); + gtk_device_grab_remove (priv->popup_window, priv->grab_pointer); gtk_widget_hide (priv->popup_window); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button), FALSE); -- 2.30.2